package com.fulihui.usercore.core.repository;

import java.util.List;

import com.fulihui.usercore.condition.ThirdMerchantCondition;
import com.fulihui.usercore.dto.ThirdMerchantDTO;
import com.fulihui.usercore.request.merchant.ThirdMerchantSaveRequest;

/**
 * 第三方商户仓储类
 * @author Willard.Hu on 2016/9/23 0023.
 */
public interface ThirdMerchantRepository {

    /**
     * 插入第三方商户
     * @param insert {@link ThirdMerchantSaveRequest}
     * @return 主键
     */
    int insert(ThirdMerchantSaveRequest insert);

    /**
     * 更新第三方商户
     * @param update {@link ThirdMerchantSaveRequest}
     * @return 执行结果
     */
    boolean update(ThirdMerchantSaveRequest update);

    /**
     * 删除第三方商户
     * @param id 主键
     * @return 执行结果
     */
    boolean delete(int id);

    /**
     * 通过主键查询第三方商户
     * @param id 主键
     * @return {@link ThirdMerchantDTO}
     */
    ThirdMerchantDTO queryByPK(int id);

    /**
     * 查询全量第三方商户
     * @return {@link ThirdMerchantDTO} 列表
     * @param condition 查询条件
     */
    List<ThirdMerchantDTO> query(ThirdMerchantCondition condition);

}
